﻿using Microsoft.EntityFrameworkCore.ChangeTracking;
using System;
using System.Collections.Generic;
using System.Text;
using Template.Infrastructure.Enums;

namespace Template.Infrastructure.EntityHistory
{

    /// <summary>
    /// 审计实体实体
    /// </summary>
    public class AuditEntityEntry
    {



        public AuditEntityEntry()
        {

            PropertyEntries = new List<AuditEntityProperty>();
        }

        /// <summary>
        /// 实体名字
        /// </summary>
        public virtual string Name { get; set; }


        /// <summary>
        /// 实体编号
        /// </summary>
        public   virtual string EntityKey{ get; set; }



        /// <summary>
        ///类型名
        /// </summary>
        public virtual string TypeName { get; set; }


        /// <summary>
        ///  关联实体
        /// </summary>
        public virtual object EntityEntry { get; set; }

        /// <summary>
        /// 实体更改类型
        /// </summary>
        public virtual EntityChangeType ChangeType { get; set; }


        public virtual ICollection<AuditEntityProperty> PropertyEntries { get; set; }

    }
}
